package com.oceanread.cn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oceanread.cn.entity.Sediment;
import com.oceanread.cn.entity.WaterDepth;
import com.oceanread.cn.mapper.SedimentMapper;
import com.oceanread.cn.mapper.WaterDepthMapper;
import com.oceanread.cn.service.ISedimentService;
import com.oceanread.cn.service.IWaterDepthService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IWaterDepthServiceImpl extends ServiceImpl<WaterDepthMapper, WaterDepth> implements IWaterDepthService {
    public List<WaterDepth> getall() {
        return baseMapper.getall();
    }

    @Override
    public List<WaterDepth> query(int page, int size, String key, String value) {
        return baseMapper.query((page - 1) * size, size, key, value);
    }
    @Override
    public List<WaterDepth> equal(String key, String value) {
        return baseMapper.equal( key, value);
    }
    @Override
    public List<WaterDepth> getTablelist(int page, int size) {
        return baseMapper.getTablelist((page - 1) * size, size);
    }

    public Integer getnum() {
        return baseMapper.getnum();
    }

    public Integer getnumquery(String key, String value) {
        return baseMapper.getnumquery(key, value);
    }

    @Override
    public int insert(String PrjCode, String Code, String Name, String Area, String Time,
                      String CenterCoordinateX, String CenterCoordinateY, String CenterCoordinateZ,String Markpath,String Terrainpath) {
        return baseMapper.insert( PrjCode,  Code,  Name,  Area,  Time,
                 CenterCoordinateX,  CenterCoordinateY,  CenterCoordinateZ,Markpath,Terrainpath);
    }
    @Override
    public Integer update(WaterDepth waterDepth) {
        return baseMapper.update(waterDepth.getSysid(),waterDepth.getPrjCode(),waterDepth.getCode(),waterDepth.getName(),
                waterDepth.getRegion(),waterDepth.getTime(),
                waterDepth.getCenterCoordinateX(),waterDepth.getCenterCoordinateY(),waterDepth.getCenterCoordinateZ(),
                waterDepth.getMarkpath(),waterDepth.getTerrainpath());
    }

    public Integer delete(int sysid) {
        return baseMapper.delete(sysid);
    }

}
